package com.xz.courseschedule.utils;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 定义属性，方便切割编码的时候选择
 */
public interface ConstantInfo {

    //普通教室 01
    String NORMAL_CLASS_ROOM = "01";

    //班级编号
    String CLASS_NO = "class_no";

    //教师编号
    String TEACHER_NO = "teacher_no";

    //课程编号
    String COURSE_NO = "course_no";

    //课程属性
    String COURSE_ATTR = "course_attr";

    //教室编号
    String ROOM_NO = "room_no";

    //上课时间
    String TIMESLOT = "timeslot";

    //开课学期
    String SEMESTER = "semester";

    //教学区域
    String AREA_NO = "area_no";

    //开始周
    String START_WEEK = "start_week";

    //结束周
    String END_WEEK = "end_week";

    //单双周
    String BIWEEKLY = "biweekly";

    //班级人数
    String CLASS_COUNT = "class_count";

    //是否异常
    String IS_FIX = "is_fix";

    //设置遗传代数
    int GENERATION = 50;
    /**
     * 编码规则  <code>编码名:编码长度<code/>
     * @description 有先后顺序
     */
    Map<String,Integer> RSLES = new LinkedHashMap<String,Integer>(){{
        put(CLASS_NO, 8);
        put(TEACHER_NO, 8);
        put(COURSE_NO, 8);
        put(COURSE_ATTR, 2);
        put(START_WEEK, 2);
        put(END_WEEK, 2);
        put(BIWEEKLY, 1);
        put(AREA_NO, 2);
        put(CLASS_COUNT, 1);
        put(IS_FIX, 1);
        put(TIMESLOT, 2);
        put(ROOM_NO, 8);
    }};
}
